#define _BURST_INTERNAL
#include <burst_kernel.h>

extern bus_event_module_t bus_win32_select_module;
extern bus_module_t bus_select_module;


extern bus_kernel_t bus_kernel;
bus_event_module_t *bus_event = &bus_win32_select_module;
bus_io_t *bus_io;
int bus_signal;


bus_module_t *bus_internal_module_table[] = {
	&bus_select_module
};

static void bus_print_module_info(bus_module_t *module)
{
	printf("Module name: %s\n"
		   "Module author: %s\n"
		   "Module description: %s\n"
		   "Module version: %s\n"
		   "Module type: %d\n\n",
		   module->info->name, 
		   module->info->author, 
		   module->info->descript,
		   module->info->version,
		   module->info->type);
}

int bus_internal_module_load_all()
{
	int nr_module = sizeof(bus_internal_module_table) / sizeof(long);
	int i;
	for(i = 0;i < nr_module;i++) {
		bus_print_module_info(bus_internal_module_table[i]);
		bus_internal_module_table[i]->init(&bus_kernel);
		bus_module_insert(bus_internal_module_table[i]);
	}
}